{% extends 'base.html' %}
<!-- 用base.html作为模板 -->

{% block title%}博客主页{% endblock %}

{% block content %}
文章列表
{% for post in posts %}
<a href="{{url_for('post',post_id=post['id'])}}"><h2>{{post['title']}}</h2></a>
<span class="badge badge-primary">{{post['created']}}</span>
<a href="{{url_for('edit',post_id=post['id'])}}" class="badge badge-warning">编辑</a>
<hr>
{% endfor %}
{% endblock %}
